package apiUtils.params;

import android.text.TextUtils;

import org.json.JSONException;
import org.json.JSONObject;

import appUtils.PayAESUtil;

/**
 * Created by Administrator on 2017/8/23.
 */

public class AESParams extends Params {
    private JSONObject mObject = new JSONObject();
    private String TAG = "AESParams";
    private String mAppid;

    @Override
    public String toString() {
        return (TextUtils.isEmpty(mAppid) ? "" : "/" + mAppid) + "/" + PayAESUtil.encryptAES(TAG, mObject.toString().replace("\\/", "/"));
    }

    @Override
    public void put(String key, String value) throws JSONException {
        mObject.put(key, value);
    }

    public void setAppid(String appid) {
        this.mAppid = appid;
    }
}
